#!/bin/bash
function draw_border() {
    declare -i width
    declare -j high
    width=79   #终端默认宽度为-1
    high=23    #终端默认高度-1
    clear
#设置显示颜色，黑底白字
    echo -e "\033[37;40m"
#设置背景颜色
    for (( i=1; i<=$width; i=i+1 ))
    do
        for (( j=1; j<=$high; j=j+1 ))
        do
        #设置显示位置
           echo -e "\033["$j";"$i"H "
        done

    done


    #画背景框
    echo -e "\033[1;1H+\033["$high";1H+\033[1;"$width"H+\033["$high";"$width"H+"
    for (( i=2; i<=$width-1; i=i+1 ))
    do
        echo -e "\033[1;"$i"H-"
        echo -e "\033["$high";"$i"H-"
    done
    for (( i=2; i<=$high-1; i=i+1 ))
    do
        echo -e "\033["$i";1H|"
        echo -e "\033["$i";"$width"H|\n"

    done


}
draw_border
